﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lmpop.frame.util.RandomID"%>
<%@page import="com.lmpop.createIndex.search.B2CHelpIndexFiles"%>
<%@page import="java.util.regex.Pattern"%>
<%@page import="java.util.regex.Matcher"%>
<jsp:useBean id="randomId" class="com.lmpop.frame.util.RandomID" scope="page" /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户注册</title>
<link href="/templets/html/mall/css/style.css" rel="stylesheet"
			type="text/css" />
<link href="/templets/html/mall/css/C2C_login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/comms/mall/newsReg.js"></script>
</head>
<body>
<%!
	public String clearHtml(String str){
		// <[^> ]+> | </[^> ]+> 为匹配html的正则式
		Pattern p = Pattern.compile( "<(.[^>]*)>");
		Matcher m = p.matcher(str);
		// 返回去除html 后的字符串
		return m.replaceAll( " ");
	} 
%>
<%
		
		String cust_id = randomId.GenTradeId(); 
		String user_id = randomId.GenTradeId(); 
		Hashtable paraMap = new Hashtable();
		Hashtable contentMap = new Hashtable();
		B2CHelpIndexFiles helpIndex=new B2CHelpIndexFiles();
		    
		paraMap.put("ch_attr", "N386668ew1C3R43|");
	    List helpList = helpIndex.getHelpInfo(paraMap);
		String  _title = "",_content="";
		if (null != helpList && helpList.size() > 0) {
			contentMap = (Hashtable) helpList.get(0);
			if (contentMap.get("title") != null)
				_title = contentMap.get("title").toString();
			if (contentMap.get("content") != null)
				_content = contentMap.get("content").toString();
		}
		%>
<script>
		  document.write("<s" + "cript type='text/javascript' src='/templets/html/mall/top.jsp'></scr" + "ipt>"); 
		</script>
<div id="contaner">
  <div class="b_w">
    <h3>用户注册/Register</h3>
    <!--<div class="l_t">
    <div class="left l_title"><img src="/templets/html/mall/images/register_title.png"></div>
    <div class="right"></div>
  </div>-->
    <div class="l_b">
      <form action="/doTradeReg.do" method="post" name="loginForm">
        <table align="center" border="0" cellpadding="3" cellspacing="1">
          <tbody>
            <tr>
              <td align="right" valign="top">登录名：</td>
              <td align="left"><input  class="input_regist"  id="loginid" name="user_name"
									onblur="checkUser_name()"  size="20" maxlength="16" type="text">
                <br>
                <SPAN style="font-size: 12px;" id="p_user_name"> 用户名长度不低于4个字符,请输入a-z,A-Z,0-9字符注册登录用户名</SPAN> </td>
            </tr>
            <tr>
              <td align="right" valign="top">性别：</td>
              <td align="left"><input name="sex" value="1" checked="checked" type="radio">
                先生
                <input name="sex" value="2" type="radio">
                女士</td>
            </tr>
            <tr>
              <td align="right" valign="top">设置密码：</td>
              <td align="left"><input  class="input_regist" id="password" name="passwd"
										onblur="checkPasswd1()" size="20" maxlength="16" type="password">
                <br>
                <SPAN style="font-size: 12px;" id="passwordLabel1">密码只能为大于6位的字母或数字</SPAN> </td>
            </tr>
            <tr>
              <td align="right" valign="top">确认密码：</td>
              <td align="left"><input  class="input_regist"  id="confirmPassword" onblur="checkPasswd2()" size="20" maxlength="16" type="password">
                <br>
                <SPAN style="font-size: 12px;" id=confirmPassword1>密码只能为大于6位的字母或数字</SPAN> </td>
            </tr>
            <tr>
              <td align="right" valign="top">电子邮箱：</td>
              <td align="left"><input class="input_regist" name="email" id="email" onblur="checkEmail()" size="30" maxlength="50" type="text">
                <br>
                <SPAN style="font-size: 12px;" id="p_email">请输入Email地址</SPAN> </td>
            </tr>
            <tr>
              <td align="right" valign="top">找回密码问题：</td>
              <td align="left"><select name="pwd_question" class="input_regist" id="pwd_question">
                  <option selected="selected" value="">- 请选择一个问题 -</option>
                  <option value="1">我的出生地是？</option>
                  <option value="2">我的宠物的名字？</option>
                  <option value="3">我就读的第一所学校的名称？</option>
                  <option value="4">我少年时代心目中的偶像是谁？</option>
                  <option value="5">我最喜欢的休闲运动是什么？</option>
                  <option value="6">我最喜欢哪支运动队？</option>
                  <option value="7">我最喜欢的运动员是谁？</option>
                  <option value="8">我的第一辆汽车或自行车是什么牌子的？</option>
                </select>
                <br>
                <SPAN style="font-size: 12px;" id="p_pwd_question">请选择密码问题，方便忘记密码时找回。</SPAN></td>
            </tr>
            <tr>
              <td align="right" valign="top">找回密码答案：</td>
              <td align="left"><input name="pwd_answer" class="input_regist" id="pwd_answer" size="20" maxlength="100" type="text" onblur="checkPWD()">
                <br>
                <SPAN style="font-size: 12px;" id="p_pwd_answer">请选择密码问题，方便忘记密码时找回。</SPAN></td>
            </tr>
            <tr>
              <td align="right" valign="top">真实姓名：</td>
              <td align="left"><input name="real_name" class="input_regist" id="real_name" size="20" maxlength="50" type="text">
                <br>
                <font color="#666666">（登录后可在我的资料中修改。）</font></td>
            </tr>
            <tr>
              <td align="right" valign="top">验证码：</td>
              <td align="left"><input id="userrand" name="userrand" type="text" onblur="checkUserrand()" class="input_y" size="4" maxlength="4" type="text">
                <img name="rc" id="rc" src="/checkImage" title="看不清楚?点击刷新" style="cursor: pointer;" onclick="changeCode()" align="absmiddle"> <SPAN style="font-size: 12px;" id="valcodeIcon"></SPAN> </td>
            </tr>
            <tr>
              <td align="right" height="60">&nbsp;</td>
              <td align="left">同意以下协议<a href="/about/8diansc_help.html?ch_attr=7ndhx63Rk04X27U|3P5N12aL452k1PM|&info_id=5qxO8302HfNEVhw" onclick="showService()"><font style=" color:blue">《<%=_title %>》</font></a></td>
            </tr>
            <tr>
              <td colspan="2">
              <textarea id="service_t" cols="5" style=" width:600px; height:90px; padding:2px;float:left;display: none;">
								<%=clearHtml(_content) %>	
			
				</textarea>
              </td>
            </tr>
            <tr>
              <td align="right" height="60">&nbsp;</td>
              <td align="left" valign="bottom"><input name="Submit" class="btn_regist" value="确认提交" onclick="Check_User_Login();" type="button">
                <input type="hidden" name="jumpurl" id="jumpurl" value="/mall_member.html" />
                <input type="hidden" name="cookietime" value="7200" />
                <input type="hidden" id="cust_type" name="cust_type" value="1" />
                <input type="hidden" id="state_code" name="state_code"	value="c" />
                <input type="hidden" id="user_class" name="user_class"	value="3" />
                <input type="hidden" id="user_type" name="user_type" value="2" />
                <input type="hidden" id="user_state" name="user_state"	value="0" />
                <input type="hidden" id="cust_class" name="cust_class"	value="3" />
                <input type="hidden" id="comm_url" name="comm_url" value="" />
                <input type="hidden" id="use_vmoney" name="use_vmoney" value="0" />
                <input type="hidden" id="cust_id" name="cust_id" value="<%=cust_id %>" />
                <input type="hidden" id="user_id" name="user_id" value="<%=user_id %>" />
                <input type="hidden" id="bpm_id" name="bpm_id" value="2624" />
              </td>
            </tr>
          </tbody>
        </table>
      </form>
    </div>
    <!--  <div class="l_f"> <img src="/templets/html/mall/images/bottom_shadow.png"> </div>
-->
  </div>
</div>
<!--底部开始-->
<div class="footer">
  <p>
    <%
						paraMap.put("ch_attr", "77f07U1647u8U0S|");
					    helpList = helpIndex.getHelpInfo(paraMap);

								if (null != helpList && helpList.size() > 0) {
									for (int i = 0; i < helpList.size(); i++) {
										contentMap = (Hashtable) helpList.get(i);
										String info_id = "", title = "",hrefurl="";
										if (contentMap.get("info_id") != null)
											info_id = contentMap.get("info_id").toString();
										if (contentMap.get("title") != null)
											title = contentMap.get("title").toString();
										hrefurl = "/about/mall_help.html?info_id=" + info_id;
										%>
    <a href="<%=hrefurl%>"><%=title%></a>|
    <%
									}
								}
					 %>
  </p>
  <p>版权所有 (C) 雷鸣科技  </p>
  <p><img src="/templets/html/mall/images/jc01.gif" /><img src="/templets/html/mall/images/jc02.gif" /><img src="/templets/html/mall/images/jc03.gif" /></p>
</div>
<!--底部结束-->
</body>
</html>
